<?php
/**
 * @version     1.0.5
 * @package     com_vereadores
 * @copyright   Copyright (C) 2013. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 * @author      JORGE EDUARDO DE O LIVEIRA LUCIANO <jeolcavaco@hotmail.com> - http://jorgeeduardo.wordpress.com
 */
// no direct access
defined('_JEXEC') or die;

//Load admin language file
$lang = JFactory::getLanguage();
$lang->load('com_vereadores', JPATH_ADMINISTRATOR);

?>


<div class="container vereadores">
<h3><?php echo $this->escape($this->params->get('page_heading')); ?></h3>

<div id="menuinterno">

</div>


<h4><?php echo $this->escape($this->params->get('page_heading')); ?></h4>



<div class="content detalhes">
	<?php if ($this->item) : ?>
		<h2><?php echo $this->item->nome; ?></h2>   
		<?php   if(isset($this->item->foto)) :?>
			<img src="<?php echo $this->item->foto; ?>" />
		<?php endif;
		
		list($ano, $mes, $dia) = explode('-', $this->item->datanascimento);
		$hoje = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
		$nascimento = mktime( 0, 0, 0, $mes, $dia, $ano);
		$idade = floor((((($hoje - $nascimento) / 60) / 60) / 24) / 365.25);
		?>

        <ul class="detalhevereador">
			<li><?php echo $this->item->introducao; ?></li>	
            <li><?php echo JText::_('COM_VEREADORES_FORM_LBL_VEREADOR_DATANASCIMENTO'); ?>:
			<?php echo $idade . " anos (". $dia ."/".$mes."/".$ano.")" ?></li>		
			<li><?php echo JText::_('COM_VEREADORES_FORM_LBL_VEREADOR_NATURALIDADE'); ?>:
			<?php echo $this->item->naturalidade; ?></li>
			<li><?php echo JText::_('COM_VEREADORES_FORM_LBL_VEREADOR_ESTADOCIVIL'); ?>:
			<?php echo $this->item->estadocivil; ?></li>
			<li><?php echo JText::_('COM_VEREADORES_FORM_LBL_VEREADOR_OCUPACAO'); ?>:
			<?php echo $this->item->ocupacao; ?></li>
			<li><?php echo JText::_('COM_VEREADORES_FORM_LBL_VEREADOR_ESCOLARIDADE'); ?>:
			<?php echo $this->item->escolaridade; ?></li>
			<li><?php echo JText::_('COM_VEREADORES_FORM_LBL_VEREADOR_PARTIDO'); ?>:
			<?php echo $this->item->partido; ?></li>
			<li><?php echo JText::_('COM_VEREADORES_FORM_LBL_VEREADOR_TELEFONE'); ?>:
			<?php echo $this->item->telefone; ?></li>
			<li><?php echo JText::_('COM_VEREADORES_FORM_LBL_VEREADOR_RAMAL'); ?>:
			<?php echo $this->item->ramal; ?></li>
			<li><?php echo JText::_('COM_VEREADORES_FORM_LBL_VEREADOR_SITE'); ?>:
			<?php echo $this->item->site; ?></li>
			<li><?php echo JText::_('COM_VEREADORES_FORM_LBL_VEREADOR_EMAIL'); ?>:
			<?php echo $this->item->email; ?></li>				
        </ul>


    <div>
    <?php echo $this->item->conteudo; ?>
    </div>
<?php


else:
    echo JText::_('COM_VEREADORES_ITEM_NOT_LOADED');
endif;
?>
	</div>
</div>
